#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QWidget>
#include "mainwindow.h"

namespace Ui {
class loginWindow;
}

class loginWindow : public QWidget
{
    Q_OBJECT

public:
    explicit loginWindow(QWidget *parent = nullptr);
    ~loginWindow();
    void login();
    void saveToDatabase();
    bool connectUserDatabase();
    void convert(QString user);
protected:
    void keyPressEvent(QKeyEvent *);
signals:
    void loginSuccess(QString user);
    void mainShow();
private slots:
    void on_reg_btn_clicked();
    void on_save_btn_clicked();
    void on_back_btn_clicked();
private:
    Ui::loginWindow *ui;
    MainWindow mainWindow;
};

#endif // LOGINWINDOW_H
